HASTHI_HOME="/u/hperera/svncode/management/"

export HASTHI_HOME

DIRLIBS="${HASTHI_HOME}/target/dist-bin/lib/*.jar"
for i in ${DIRLIBS}
do
   CLASSPATH="$i":$CLASSPATH
done
CLASSPATH=${HASTHI_HOME}/target/classes:$CLASSPATH


cd ${HASTHI_HOME}

LOG_FILE=logs/perf-`date +%m_%d_%H_%M`.log

echo $LOG_FILE

MEM_LIMIT="256"
RESOURCE_COUNTS="100 200 300 500 750 1000 2000 5000 7500 10000 12500 15000 17500 20000 25000 30000 35000 40000 50000 60000 70000 80000 90000 100000"
RULE_FILE=/u/hperera/svncode/management/resources/rules/lead8.drl
echo $RULE_FILE $HOST_NAME >> $LOG_FILE
for m in ${MEM_LIMIT}; do
	for r in ${RESOURCE_COUNTS}; do
		echo "[ Mem =" $m " Resource Count=" $r  "]">> $LOG_FILE
		for ((i=0;i<=200;i+=1)); do
			java -Xmx${m}m -cp $CLASSPATH hasthi.tools.analyze.RulePerfSuite  $RULE_FILE $r >> $LOG_FILE
		done
	done	
done	
echo "----------------------------- Completed ---------------------------------">> $LOG_FILE